<?php
if (!defined('IN_MEDIA')) die("Hacking attempt");
if ($id) {
	$q = $mysql->query("SELECT gift_id, gift_media_id, gift_sender_name, gift_recip_name, gift_message, gift_time FROM ".$tb_prefix."gift WHERE gift_id = '".$id."'");
	if ($mysql->num_rows($q)) {
		$r = $mysql->fetch_array($q);
			$message = m_text_tidy($r['gift_message']);
			$row = $mysql->fetch_array($mysql->query("SELECT m_id, m_type, m_is_local, m_width, m_height FROM ".$tb_prefix."data WHERE m_id = '".$r['gift_media_id']."'"));
				/////// SONG PLAYING ////////
				if($row['m_width'] == 0) {
					$width = 350;
				}
				if($row['m_height'] == 0) {
					$height = 350;
				}
				if($row['m_width']) {
					$width = $row['m_width'];
				}
				if($row['m_height']) {
					$height = $row['m_width'];
				}
				$url_play = $mainURL.'/asx.php?type=1&id='.$song_ID;
				//////// END SONG PLAYING ////////
			include("templates/".$_SESSION['current_tpl']."/gift_receive.html");
	}
	if (!$mysql->num_rows($q)) {
		echo "<center><b>Mã số quà tặng sai</b></center>";
	}
}
?>